import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from "vuex-persistedstate"

Vue.use(Vuex)

export default new Vuex.Store({
  plugins: [
	createPersistedState({
		storage: window.sessionStorage
	})
  ],
  state: {
	  token: null
  },
  getters: {
	  GET_TOKEN (state) { return state.token }
  },
  mutations: {
	  SET_TOKEN (state, token) { state.token = token }
  },
  actions: {
  },
  modules: {
  }
})
